package org.millioncall.yueyoga.admin.service;

import java.util.List;
import java.util.Map;

import org.millioncall.openplatform.common.PaginatedList;
import org.millioncall.yueyoga.admin.model.Group;

public interface GroupService {

	/**
	 * 根据组名获得组集合信息
	 * 
	 * @param groupNames
	 * @return
	 */
	public List<Group> findGroupsByGroupName(String[] groupNames);

	/**
	 * 获得所有组集合信息
	 * 
	 * @return
	 */
	public List<Group> findByUserId(String userId);
	
	public List<Group> findAllGroups();

	public List<Group> findAllGroup();

	public PaginatedList<Group> getGroupsInPage(int start, int limit,
			Map<String, Object> map);

	public boolean saveGroup(Map<String, Object> map);

	public boolean saveGroupRole(Map<String, Object> map);

	public boolean savegrantRoles(String groupId,String roleIdIds);
	
	public boolean saveGrantHall(String groupId,String roleIdIds);
	
	public boolean saveGrantGroups (String userId,String[] groupIds);
	
	public String findEnNameById(String[] strId);

	public Group findGroupIdByName(String name);
	
	public Group findGroupByChName(String name);

	public boolean updateGroup(Map<String, Object> map);

	public boolean updateGroupRole(Map<String, Object> map);

	public Group findGroupById(int id);

	public void deleteGroupById(int[] id);

	public void deleteGroupRoleById(int[] id);

	public void deleteGroupUserById(int[] id);

}
